/*
 * XML Type:  BillDetailRow
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.BillDetailRow
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML BillDetailRow(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class BillDetailRowImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements net.ofx.types.x2003.x04.BillDetailRow
{
    
    public BillDetailRowImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName C$0 = 
        new javax.xml.namespace.QName("", "C");
    private static final javax.xml.namespace.QName N$2 = 
        new javax.xml.namespace.QName("", "N");
    
    
    /**
     * Gets array of all "C" elements
     */
    public java.lang.String[] getCArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(C$0, targetList);
            java.lang.String[] result = new java.lang.String[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
            return result;
        }
    }
    
    /**
     * Gets ith "C" element
     */
    public java.lang.String getCArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(C$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "C" elements
     */
    public net.ofx.types.x2003.x04.MessageType[] xgetCArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(C$0, targetList);
            net.ofx.types.x2003.x04.MessageType[] result = new net.ofx.types.x2003.x04.MessageType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "C" element
     */
    public net.ofx.types.x2003.x04.MessageType xgetCArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(C$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (net.ofx.types.x2003.x04.MessageType)target;
        }
    }
    
    /**
     * Returns number of "C" element
     */
    public int sizeOfCArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(C$0);
        }
    }
    
    /**
     * Sets array of all "C" element
     */
    public void setCArray(java.lang.String[] cArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(cArray, C$0);
        }
    }
    
    /**
     * Sets ith "C" element
     */
    public void setCArray(int i, java.lang.String c)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(C$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setStringValue(c);
        }
    }
    
    /**
     * Sets (as xml) array of all "C" element
     */
    public void xsetCArray(net.ofx.types.x2003.x04.MessageType[]cArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(cArray, C$0);
        }
    }
    
    /**
     * Sets (as xml) ith "C" element
     */
    public void xsetCArray(int i, net.ofx.types.x2003.x04.MessageType c)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.MessageType target = null;
            target = (net.ofx.types.x2003.x04.MessageType)get_store().find_element_user(C$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(c);
        }
    }
    
    /**
     * Inserts the value as the ith "C" element
     */
    public void insertC(int i, java.lang.String c)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(C$0, i);
            target.setStringValue(c);
        }
    }
    
    /**
     * Appends the value as the last "C" element
     */
    public void addC(java.lang.String c)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(C$0);
            target.setStringValue(c);
        }
    }
    
    /**
     * Removes the ith "C" element
     */
    public void removeC(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(C$0, i);
        }
    }
    
    /**
     * Gets array of all "N" elements
     */
    public java.lang.String[] getNArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(N$2, targetList);
            java.lang.String[] result = new java.lang.String[targetList.size()];
            for (int i = 0, len = targetList.size() ; i < len ; i++)
                result[i] = ((org.apache.xmlbeans.SimpleValue)targetList.get(i)).getStringValue();
            return result;
        }
    }
    
    /**
     * Gets ith "N" element
     */
    public java.lang.String getNArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(N$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) array of all "N" elements
     */
    public net.ofx.types.x2003.x04.CharType[] xgetNArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(N$2, targetList);
            net.ofx.types.x2003.x04.CharType[] result = new net.ofx.types.x2003.x04.CharType[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets (as xml) ith "N" element
     */
    public net.ofx.types.x2003.x04.CharType xgetNArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CharType target = null;
            target = (net.ofx.types.x2003.x04.CharType)get_store().find_element_user(N$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return (net.ofx.types.x2003.x04.CharType)target;
        }
    }
    
    /**
     * Returns number of "N" element
     */
    public int sizeOfNArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(N$2);
        }
    }
    
    /**
     * Sets array of all "N" element
     */
    public void setNArray(java.lang.String[] nArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(nArray, N$2);
        }
    }
    
    /**
     * Sets ith "N" element
     */
    public void setNArray(int i, java.lang.String n)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(N$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.setStringValue(n);
        }
    }
    
    /**
     * Sets (as xml) array of all "N" element
     */
    public void xsetNArray(net.ofx.types.x2003.x04.CharType[]nArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(nArray, N$2);
        }
    }
    
    /**
     * Sets (as xml) ith "N" element
     */
    public void xsetNArray(int i, net.ofx.types.x2003.x04.CharType n)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.CharType target = null;
            target = (net.ofx.types.x2003.x04.CharType)get_store().find_element_user(N$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(n);
        }
    }
    
    /**
     * Inserts the value as the ith "N" element
     */
    public void insertN(int i, java.lang.String n)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = 
                (org.apache.xmlbeans.SimpleValue)get_store().insert_element_user(N$2, i);
            target.setStringValue(n);
        }
    }
    
    /**
     * Appends the value as the last "N" element
     */
    public void addN(java.lang.String n)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(N$2);
            target.setStringValue(n);
        }
    }
    
    /**
     * Removes the ith "N" element
     */
    public void removeN(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(N$2, i);
        }
    }
}
